<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="box">
        <!-- <input type="checkbox">多选框1<br/>
        <input type="checkbox">多选框2<br/>
        <input type="checkbox">多选框3<br/>
        <input type="checkbox">多选框4<br/>
        <input type="checkbox">多选框5<br/>
        <button>全选</button> -->
    </div>
    <button onclick="exports">导出</button>
    <script>
        let boxSum = [{
            name: '多选框1',
            id: 1
        },{
            name: '多选框2',
            id: 2
        },{
            name: '多选框3',
            id: 3
        },{
            name: '多选框4',
            id: 4
        },{
            name: '多选框5',
            id: 5
        }]
        let box = document.getElementsByClassName('box')[0];
        var option = '';
        for(var i=0; i< boxSum.length; i++){
            option += '<input type="checkbox">' + boxSum[i].name + '<br/>';
        }
        box.innerHTML = option;
        
        
    </script>
</body>
</html>